package com.smz.service.impl;

import com.smz.dao.CommodityDAO;
import com.smz.entity.Commodity;
import com.smz.service.CommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommodityServiceImpl implements CommodityService {

    @Autowired
    private CommodityDAO commodityDAO;
    @Override
    public Commodity findCommodityById(Integer id) {
        return commodityDAO.selectCommodityById(id);
    }

    @Override
    public List<Commodity> findAllCommodity() {
        return commodityDAO.selectAllCommodity();
    }
}
